'\"macro stdmacro
.\"
.\" Copyright (c) 2020-2021 Red Hat.
.\" Copyright (c) 2008 Aconex.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMDAKVM 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmdakvm\f1 \- Linux virtualization performance metrics domain agent (PMDA)
.ds ia kvm
.SH SYNOPSIS
\f3$PCP_PMDAS_DIR/\*(ia/pmda\*(ia\f1
[\f3\-D\f1 \f2debug\f1]
.SH DESCRIPTION
\f3pmdakvm\f1 is a Performance Metrics Domain Agent (\s-1PMDA\s0) which
exports metric values from the Linux KVM (Kernel Virtual Machine)
virtualization subsystem.
.PP
Per-processor KVM trace metrics from the kernel events enumerated below
.I /sys/kernel/debug/tracing/events/kvm
can be configured statically using the
.B pmdakvm
configuration file,
.IR /etc/pcp/kvm/kvm.conf .
.SH INSTALLATION
Optionally configure trace points in the configuration file,
then install the KVM PMDA by using the Install script as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/kvm
# ./Install
.fi
.ft P
.RE
.sp 1
To uninstall, do the following as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/kvm
# ./Remove
.fi
.ft P
.RE
.sp 1
\fBpmdakvm\fR is launched by \fIpmcd\fR(1) and should never be executed
directly. The Install and Remove scripts notify \fIpmcd\fR(1) when the
agent is installed or removed.
.SH CAVEATS
When
.B pmdakvm
is running, it holds references to kernel resources within the KVM
device driver.
It is thus not possible to unload or reload the device driver module
while the PMDA is running.
The ideal procedure to follow in order to reload the kernel module is
the reverse of that described in the ``INSTALLATION'' section above -
i.e. first run
.BR ./Remove ,
then reload the kernel module,
then run
.BR ./Install .
.SH FILES
.IP "\fB$PCP_SYSCONF_DIR/kvm/kvm.conf\fR" 4
configuration file for the \fBpmdakvm\fR agent
.IP "\fB$PCP_PMDAS_DIR/kvm/Install\fR" 4
installation script for the \fBpmdakvm\fR agent
.IP "\fB$PCP_PMDAS_DIR/kvm/Remove\fR" 4
undo installation script for the \fBpmdakvm\fR agent
.IP "\fB$PCP_LOG_DIR/pmcd/kvm.log\fR" 4
default log file for error messages from \fBpmdakvm\fR
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fR are used to parameterize
the file and directory names used by \fBPCP\fR. On each installation, the
file \fB/etc/pcp.conf\fR contains the local values for these variables.
The \fB$PCP_CONF\fR variable may be used to specify an alternative
configuration file, as described in \fIpcp.conf\fR(5).
.SH DEBUGGING OPTIONS
The
.B \-D
or
.B \-\-debug
option enables the output of additional diagnostics on
.I stderr
to help triage problems, although the information is sometimes cryptic and
primarily intended to provide guidance for developers rather end-users.
.I debug
is a comma separated list of debugging options; use
.BR pmdbg (1)
with the
.B \-l
option to obtain
a list of the available debugging options and their meaning.
.SH SEE ALSO
.BR PCPIntro (1),
.BR pmcd (1)
and
.BR kvm (1).

.\" control lines for scripts/man-spell
.\" +ok+ pmdakvm KVM kvm sys
